#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button = new QPushButton(this);
    button->setGeometry(0,0,100,100);
    button->setText("按钮");
    // margin : 10px 20px 上下的外边框是10px 左右的外边框是20px
    button->setStyleSheet("QPushButton {border : 10px ridge red;"
                                       "margin : 5px 20px }");

    qDebug() << button->geometry();

}

Widget::~Widget()
{
    delete ui;
}

